package wechat

import (
	"time"

	"gddgame.cc/galaxy/utils/orm"
)

var (
	WechatRobotModel   = orm.NewModel("wechat_robot", &WechatRobot{}, nil)
	WechatMessageModel = orm.NewModel("wechat_message", &WechatMessage{}, nil)
)

type WechatRobot struct {
	Talker string `json:"talker" orm:"primary" sql:"VARCHAR"`
	Name   string `json:"name" sql:"VARCHAR"`

	IsChatroom bool `json:"is_chatroom" sql:"TINYINT"`

	LastTime *time.Time `json:"last_time" sql:"DATETIME"`
	Status   bool       `json:"status" sql:"TINYINT"`

	// 发送数量
	Number int `json:"number"`
}

type WechatMessage struct {
	Id         int        `json:"id" orm:"auto" sql:"INT"`
	Talker     string     `json:"talker" sql:"VARCHAR"`
	Message    string     `json:"message" sql:"VARCHAR"`
	CreateTime *time.Time `json:"create_time" orm:"createTime" sql:"DATETIME"`
	SendTime   *time.Time `json:"send_time" sql:"DATETIME"`
}
